<?php
/**
 * View do formulário de tarefa
 * @filesource  06/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.views
 * @version     $Id$
 */
 ?>
<div class="ev-formulario">
    <h3><?php echo $this->translate('id_tarefa'); ?></h3>
    <form action="<?php echo $this->baseUrl() ?>/tarefa/tarefa/gravar" method="post" name="formulario" id="formulario">
        <input type="hidden" name="id_tarefa" id="id_tarefa" value="<?php echo $this->row->id_tarefa; ?>" />

        <label for="fk_projeto"><?php echo $this->translate('fk_projeto'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <?php echo $this->formSelect( "fk_projeto", $this->row->fk_projeto, array( "id" => "fk_projeto", "title" => $this->translate("fk_projeto"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_projeto"]); ?><br />

        <label for="fk_servico"><?php echo $this->translate('fk_servico'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <?php echo $this->formSelect( "fk_servico", $this->row->fk_servico, array( "id" => "fk_servico", "title" => $this->translate("fk_servico"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_servico"]); ?><br />

        <label for="fk_usuario"><?php echo $this->translate('fk_usuario'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <?php echo $this->formSelect( "fk_usuario", $this->row->fk_usuario, array( "id" => "fk_usuario", "title" => $this->translate("fk_usuario"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_usuario"]); ?><br />

        <label for="st_nome"><?php echo $this->translate('st_nome'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="st_nome" id="st_nome" value="<?php echo $this->row->st_nome; ?>" title="<?php echo $this->translate("st_nome"); ?>"  maxlength="150" /><br />

        <label for="dt_cadastro"><?php echo $this->translate('dt_cadastro'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <input class="text ui-widget-content ui-corner-all  required data " type="text" name="dt_cadastro" id="dt_cadastro" value="<?php echo $this->dateFormat($this->row->dt_cadastro); ?>" title="<?php echo $this->translate("dt_cadastro"); ?>"   /><br />

        <label for="cs_situacao"><?php echo $this->translate('cs_situacao'); ?>&nbsp;<span class="campoObrigatorio">*</span>:</label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="cs_situacao" id="cs_situacao" value="<?php echo $this->row->cs_situacao; ?>" title="<?php echo $this->translate("cs_situacao"); ?>"   /><br />

        <label for="dt_inicio"><?php echo $this->translate('dt_inicio'); ?>:</label>
        <input class="text ui-widget-content ui-corner-all data " type="text" name="dt_inicio" id="dt_inicio" value="<?php echo $this->dateFormat($this->row->dt_inicio); ?>" title="<?php echo $this->translate("dt_inicio"); ?>"   /><br />

        <label for="dt_fim"><?php echo $this->translate('dt_fim'); ?>:</label>
        <input class="text ui-widget-content ui-corner-all data " type="text" name="dt_fim" id="dt_fim" value="<?php echo $this->dateFormat($this->row->dt_fim); ?>" title="<?php echo $this->translate("dt_fim"); ?>"   /><br />

        <div id="botoesAcao">
            <input type="submit" class="btSalvar" name="enviar" id="enviar" value="Enviar" />
            <input type="button" class="btExcluir" name="cancelar" id="cancelar" value="Cancelar" />
        </div>
    </form>
</div>

<script type="text/javascript">
    $().ready(function() {
        $("form").validate();
        $('#cancelar').click(function(){
            window.location = "<?php echo $this->baseUrl() ?>/tarefa/tarefa";
        });
    });
</script>